var login = {
    feedback_submit: document.getElementById('feedback_submit'),
    signup_form: document.getElementById('signup_form'),
    signup_wait: document.getElementById('signup_wait'),
    x_frame_loginform: document.getElementById('x_frame_loginform'),
    
    init: function() {
	
    },
    
    keydown: function (e) {
	if (e.keyCode == 13) {
	    login.SubmitClick();
	}
    },
    
    SubmitClick: function() {
	EMDE.hideElement(login.signup_form);
	EMDE.showElement(login.signup_wait);
	login.x_frame_loginform.submit();
    },
    
    SubmitCallback: function(boolValid, errMsg) {
	if(boolValid == true) {
	    EMDE.hideElement(login.feedback_submit);
	    login.feedback_submit.innerHTML = '&nbsp;';
	    window.location = "/";
	} else {
	    EMDE.showElement(login.feedback_submit);
	    login.feedback_submit.innerHTML = errMsg;
	    EMDE.showElement(login.signup_form);
	    EMDE.hideElement(login.signup_wait);
	}
    }
}

